import React, { Component } from 'react';
import styles from './topControl.less';
import classnames from 'classnames';
//import TimeNow from './TimeNow/timeNow'; 

import Menu from './Menu/menu';
 
const pageModules=[]
class TopControl extends Component {
  constructor(props){
    super(props);
    this.state={
      selectIndex:-1, 
    }
  }

  handleTabClick = ({value,index})=>{ 
      this.setState({
        selectIndex:index,   
      },()=>{
        this.props.handleTabClick(value);
      })
  }
  
 
  
  render() {
    const { history,doLoginOut } = this.props;
    const {selectIndex,show} = this.state;
     
    return ( 
      <div className={styles.topControl}>
           <div className={styles.controlCon}>
                <div className={styles.logo} onClick={this.handleTabClick.bind(this,{value:'',index:-1})}>雄安新区智慧气象平台</div> 
                <Menu handleTabClick = {this.handleTabClick} selectIndex={selectIndex}  />   
           </div> 
      </div>
    );
  }
}

export default TopControl;
